
<!--回复-->
<div id="reply-modal" class="modal fade modal_small" role="dialog" aria-labelledby="myModalLabel1" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                <h4 class="modal-title"></h4>
            </div>
            <form action="<?php echo getUrl('product/comment/saveReply'); ?>" class="form-horizontal" id="reply-form" method="post">
                <div class="modal-body">
                    <div class="form-group">
                        <label class="control-label col-md-2">回复内容<span class="required">*</span></label>
                        <div class="col-md-9">
                            <textarea rows="5" name="comment" cols="55"></textarea>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden" name="id" value=""/>
                    <button class="btn default" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i> 关闭</button>
                    <button type="submit" class="btn green field-submit-btn"><i class="fa fa-save"></i> 保存</button>
                    <script>
                        $(function(){
                            var model = $('#reply-modal');
                            $('.reply').live('click', function(){
                                model.find('.modal-title').html('评论回复');
                                model.find('.has-error').removeClass('has-error').find('.validate_message').remove();
                                model.find('.show_message_error').remove();

                                var id = $(this).attr('data-id');
                                model.find('[name="id"]').val(id);
                                model.modal();
                                return false;
                            });

                            $('#reply-modal').on('shown.bs.modal', function (e) {
                                uploader.refresh();
                            });

                            $.e_validate.init('#reply-form',{modal:model,ignore:'',successCallback:function(data){
                                $('#datatable').dataTable().fnDraw();
                            }});
                        })

                    </script>

                </div>
            </form>
        </div>
    </div>
</div>